feat: add .slnx solution format support#112
Open
slang25 wants to merge 2 commits into
Open
Conversation
Upgrade Roslyn from 4.4.0 to 5.3.0 to enable MSBuildWorkspace.OpenSolutionAsync() to parse the XML-based .slnx format introduced in .NET 9 / VS 17.10. Changes: - Bump Microsoft.CodeAnalysis.* packages from 4.4.0 to 5.3.0 - Bump System.Configuration.ConfigurationManager from 7.0.0 to 9.0.0 - Add .slnx to auto-discovery, restore, and solution loading checks - Drop net6.0/net7.0 TFMs (Roslyn 5.x requires net8.0+; both are EOL) - Bump version to 0.2.14 - Add snapshot test using .slnx format Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Roslyn 5.x requires net8.0+; aligns CI matrix with the TFMs supported by the project after the .slnx upgrade. Addresses review feedback on sourcegraph#110. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continues @idg2's work in #110 and addresses the review feedback from @jupblb.
Summary
Add support for the XML-based
.slnxsolution format introduced in .NET 9 / Visual Studio 17.10.MSBuildWorkspace.OpenSolutionAsync()gained native.slnxsupport in Roslyn 5.0.0+ (dotnet/roslyn#77326).slnxto auto-discovery —FindSolutionOrProjectFilenow finds.slnxfiles alongside.sln.slnxto restore and loading — solution restore andOpenSolutionAsyncpaths treat.slnxsame as.slnnet6.0/net7.0TFMs — Roslyn 5.x requiresnet8.0+; both .NET 6 and 7 are end-of-life.github/workflows/test.ymlto match the supported TFMs (this is the additional change requested in the review on feat: add .slnx solution format support #110)syntax-slnxtest fixture validates SCIP indexing via.slnxMotivation
The
.slnxformat is the default fordotnet new slnin .NET 10 and is increasingly adopted in modern .NET projects. Without this change,scip-dotnetcannot index codebases that use.slnx, requiring manual workarounds (passing individual.csprojfiles instead).Credit
The substantive work here is by @idg2 (original PR #110) — authorship of that commit is preserved. This PR adds the CI workflow update requested by @jupblb in review.
Test plan
syntaxsnapshot test passes (.slnpath unchanged)syntax-slnxsnapshot test passes (.slnxauto-discovered and indexed)dotnet buildsucceeds on net8.0/net9.0/net10.0.github/workflows/test.ymlupdated to match the dropped TFMs🤖 Generated with Claude Code